﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using FluentValidation.Attributes;

namespace Home.WebUI.Areas.Example.Models.Validation
{
    [Validator(typeof(UserInfoValidator))]
    public class UserInfo
    {
        /// <summary>
        /// 用户名
        /// </summary>
        [Remote("UserExists", "Salesman", ErrorMessage = "用户账号已存在")] 
        public string UserName { get; set; }
        /// <summary>
        /// 密码
        /// </summary>
        public string PassWord { get; set; }
        /// <summary>
        /// 确认密码
        /// </summary>
        public string VPassWord { get; set; }
        /// <summary>
        /// 注册Ip
        /// </summary>
        public string Ip { get; set; }
        /// <summary>
        /// Email
        /// </summary>
        public string Email { get; set; }
        /// <summary>
        /// 手机
        /// </summary>
        public string Phone { get; set; }
        /// <summary>
        /// 创建日期
        /// </summary>
        public DateTime? CreateDate { get; set; }
        /// <summary>
        /// 最近登陆日期
        /// </summary>
        public DateTime? LoginDate { get; set; }
    }
}